<!--{hook/global_footer_mobile}-->
<!--{eval $useragent = strtolower($_SERVER['HTTP_USER_AGENT']);$clienturl = ''}-->
<!--{if strpos($useragent, 'iphone') !== false || strpos($useragent, 'ios') !== false}-->
<!--{eval $clienturl = $_G['cache']['mobileoem_data']['iframeUrl'] ? $_G['cache']['mobileoem_data']['iframeUrl'].'&platform=ios' : 'http://www.discuz.net/mobile.php?platform=ios';}-->
<!--{elseif strpos($useragent, 'android') !== false}-->
<!--{eval $clienturl = $_G['cache']['mobileoem_data']['iframeUrl'] ? $_G['cache']['mobileoem_data']['iframeUrl'].'&platform=android' : 'http://www.discuz.net/mobile.php?platform=android';}-->
<!--{elseif strpos($useragent, 'windows phone') !== false}-->
<!--{eval $clienturl = $_G['cache']['mobileoem_data']['iframeUrl'] ? $_G['cache']['mobileoem_data']['iframeUrl'].'&platform=windowsphone' : 'http://www.discuz.net/mobile.php?platform=windowsphone';}-->
<!--{/if}-->
<section id="pushbutton"></section>
<div class="banzhuan-clear"></div>
<div id="mask" style="display:none;"></div>
<!--{if !$nofooter}-->
<!--{/if}-->
<div class="banzhuan-bottom"></div>
<div id="footbar" class="bottom">
    <div class="fbc">
        <ul>
            <li class="{if $_GET['mod'] == 'guide' || $_GET['order'] == 'dateline' || $_GET['order'] == 'replies' || $_GET['order'] == 'views' || $_GET['order'] == 'digest'} a{/if}"><a href="/" class="iconfont {if $_GET['mod'] !== 'guide' && $_GET['order'] !== 'dateline' && $_GET['order'] !== 'replies' && $_GET['order'] !== 'views' && $_GET['order'] !== 'digest' && $_GET['mod'] !== 'space' && $_GET['mod'] !== 'forum' && $_GET['mod'] !== 'spacecp' && $_GET['mod'] !== 'logging' && $_GET['mod'] !== 'register' && $_GET['mod'] !== 'post' && $_GET['action'] !== 'nav'}icon-homefill{else}icon-home{/if}"></a></li>
            <li class="{if $_GET['mod'] !== 'guide' && $_GET['order'] !== 'dateline' && $_GET['order'] !== 'replies' && $_GET['order'] !== 'views' && $_GET['order'] !== 'digest' && $_GET['mod'] !== 'space' && $_GET['mod'] !== 'forum' && $_GET['mod'] !== 'spacecp' && $_GET['mod'] !== 'logging' && $_GET['mod'] !== 'register' && $_GET['mod'] !== 'post' && $_GET['action'] !== 'nav'} a{/if}"><a href="/bbs/bzweibo.php?order=dateline&mobile=2" class="iconfont  {if $_GET['mod'] == 'guide' || $_GET['order'] == 'dateline' || $_GET['order'] == 'replies' || $_GET['order'] == 'views' || $_GET['order'] == 'digest'}icon-search2{else}icon-search1{/if}"></a></li>
            <li class="{if $_GET['mod'] == 'post' || $_GET['action'] == 'nav'} a{/if}"><a href="javascript:;" id="releasebbs" class=" iconfont {if $_GET['mod'] == 'post' || $_GET['action'] == 'nav'}icon-writefill{else}icon-write{/if}"></a></li>
            <li class="{if $_GET['mod'] == 'forum'} a{/if}"><a href="/user/message" id="bbs_count" class="iconfont {if $_GET['mod'] == 'forum'}icon-markfill{else}icon-mark{/if}" style="position: relative;"></a></li>
            <li class="{if $_GET['mod'] == 'space' || $_GET['mod'] == 'spacecp' && $_GET['type'] != 'forum'} a{/if}"><a href="/user" class="iconfont {if $_GET['mod'] == 'space' || $_GET['mod'] == 'spacecp' && $_GET['type'] != 'forum'}icon-peoplefill{else}icon-people{/if}"></a><!--{if $_G[member][newpm]}--><em></em><!--{/if}--></li>
        </ul>
    </div>
</div>
<script>window.jQuery || document.write('<script src="js/jquery-2.1.1.min.js"><\/script>')</script>
<script>
    jQuery("#releasebbs").click(function(){
        var id="$_G['uid']";
        // var id3="$_SESSION['bbs_uid']"
        if(id == "" || id == 0 ){
            alert("You can only initiate an activity after login！");
        }else{
            var urllianjie='/api/userinfo?action=get_userinfo&id='+id;
            jQuery.post(urllianjie,{ info_id:id }).success(function(data){
                data = JSON.parse(data);
                
    	        if(data.data.if_check!=1 && data.data.gr_type == 4){
                 	alert("Please select the user type!");
                }else if(data.data.if_check!=1 && data.data.gr_type == 1){
                    // alert("Pending! Please be patient.");
                    alert("Pending.Please upload your student ID picture to complete your registration");
                }else{
                    if(data.data&&data.data.gr_type == 4 ){
                        newpushView();
                        // self.location='/bbs/forum.php?mod=misc&action=nav&mobile=2';
                    }else {
                        pushView();
                    }
    	        }
            })
        }
    });
</script>
<script>

    function pushView () {
        var pub = new Pushbutton('#pushbutton', {
            data: [
                //{text:'Live' },
                {text:'Post'},
                {text:'Activity' },
                {text:'Travel Plan'}
            ],
            // 点击回调 返回true 则不隐藏弹出框
            onClick: function( e ) {
//         		alert(e.index);
                if(e.index==0){
                    location.reload();
                }
                else if(e.index==1){  //跳转到直播
                    self.location='/bbs/forum.php?mod=misc&action=nav&mobile=2';
                }
                else if(e.index==2){  //活动发布 gongkun
                    var id="$_G[uid]";
                    var urllianjie='/api/userinfo?action=get_userinfo&id='+id;
                    $.post(urllianjie,{ action:"get_userinfo",id:id }).success(function(data){
                        data = JSON.parse(data);
                        if(data.data.gr_type == 4 ){
                            self.location='/bbs/forum.php?mod=misc&action=nav&mobile=2';
                        }else{
                            self.location='/main/post';
                        }
                    })
                }else if(e.index==3){
                    self.location='/main/post/3';
                }else{
                }

                return true;
            },
            // maxHeight: 100,  // 默认显示的高度
            isShow: true   // 默认是否显示
        });
    }

    function newpushView () {
        var pub = new Pushbutton('#pushbutton', {
            data: [
                {text:'Post'},
                {text:'Travel Plan'}
            ],
            // 点击回调 返回true 则不隐藏弹出框
            onClick: function( e ) {
//              alert(e.index);
                if(e.index==0){
                    location.reload();
                }else if(e.index==1){  //活动发布 gongkun
                    self.location='/bbs/forum.php?mod=misc&action=nav&mobile=2';
                }else if(e.index==2){
                    self.location='/main/post/3';
                }else{
                }

                return true;
            },
            // maxHeight: 100,  // 默认显示的高度
            isShow: true   // 默认是否显示
        });
    }

    $(function(){
        var user_id="$_G[uid]";
        var api_url ='/api/get_msg_count';
        $.post(api_url, { action:"get_msg_count",bbs_uid:user_id}, function(data){
            data = eval('(' + data + ')');

            if(data.message_num > 0){
                var str="<span class=\"msg_num btttom_msg\" style=\"\">"+data.message_num+"</span>";
                $("#bbs_count").append(str);
            }
        })

    })
</script>
<style type="text/css">
.mobile-inner-header{max-width: 640px;}
#footbar{max-width: 640px;}
</style>
</body>
</html>
<!--{eval updatesession();}-->
<!--{if defined('IN_MOBILE')}-->
	<!--{eval output();}-->
<!--{else}-->
	<!--{eval output_preview();}-->
<!--{/if}-->
